package interestProgram;

import java.text.DecimalFormat;

public class interestProgram 
{

	public static void main(String[] args) 
	{
		
		//Creates variable space for the money in the account and the interest per year
		//Also set the decimal precision to two decimal places
		
		DecimalFormat precisionTwo = new DecimalFormat("#0.00");
		double accountBalance = 10000.00;
		double interestYear = 1.05;
		
		//Computes and print the the account balance with interest over four years
		accountBalance = accountBalance * interestYear;
		System.out.println("Year 1:  $ " + precisionTwo.format(accountBalance));
		
		accountBalance = accountBalance * interestYear;
		System.out.println("Year 2:  $ " + precisionTwo.format(accountBalance));
		
		accountBalance = accountBalance * interestYear;
		System.out.println("Year 3:  $ " + precisionTwo.format(accountBalance));
		
		accountBalance = accountBalance * interestYear;
		System.out.println("Year 4:  $ " + precisionTwo.format(accountBalance));
		

	}

}